/*
 * RedisManager.h
 *
 *  Created on: Sep 19, 2016
 *      Author: root
 */

#ifndef BASE_REDIS_YREDISMANAGER_H_
#define BASE_REDIS_YREDISMANAGER_H_
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <hiredis/hiredis.h>
#include <string>
class RedisManager {
private:
	static pthread_key_t key;
	static std::string ip;
	static int port;
	static int timeout;
public:
	static void closeKey(void* thread_log);
	static void init();
	static redisContext* getConn();
	static void destory();
};

#endif /* BASE_REDIS_YREDISMANAGER_H_ */
